﻿@model  XT.Model.District
@{
    ViewBag.Title = "District";
    Layout = "~/Views/Global/Layout.cshtml";
}
<script src="/Scripts/District/Index.js" type="text/javascript"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>

<div class="hero1" style="background-image: url('/Images/q1.jpg'); background-size: 100% auto; padding-top: 90px;">
</div>
<div class="districsummary">
    <div class="container">
        <div class="row">
            <div class="districname">
                <h5>Ho Chi Minh City</h5>
                <p>Quận @Model.District_Name</p>

            </div>
            <div class="districdetail">
                <h5>Description</h5>
                <p>From dawn until dusk until dawn again, trendsetting Distric 1 never sleeps and never lets up.</p>
            </div>
            <div class="districplacedetail">
                <h5>Places to stay</h5>
                <p>@Model.Areas.SelectMany(a => a.Rooms).Count()</p>
               
                <button onclick="location.href='@Url.Action("AllRooms", "District", new { id = Model.Id })'" type="button" class="btn btn-info">See @Model.Areas.SelectMany(a => a.Rooms).Count() listings »</button>
                    

            </div>
        </div>
    </div>
    <br />
    <br />
    <div class="container">
        <h2>On the Map</h2>
        <div id="map-canvas"></div>

    </div>
    <br />
</div>
<div class="districlocation" style="background-color: rgb(245, 245, 245)">
    <div class="container">

        <!-- Example row of columns -->
        <div class="navdirect">
            <a href="Home_Demo2.aspx">Home</a>
            ›
                    <a href="#">Ho Chi Minh</a>
            ›
                     <a href="#">District 1</a>
            ›
        </div>
        <div class="districtitle">
            <h1>Featured Locations</h1>
        </div>
        <div class="row">
            @foreach (XT.Model.Room room in Model.Areas.SelectMany(a => a.Rooms).OrderByDescending(r => r.Room_Created_Date).Take(6))
            {  
                @Html.Partial("../Global/RoomContainer", room)
            }
        </div>
        <a id="linkmorehouse" href="#">Xem tất cả</a>
    </div>
</div>
<div class="districtArea" style="background-color: rgb(250, 250, 250); padding-bottom: 10px">
    <div class="container">
        <div class="districtitle">
            <h1>Khu vực ở quận Bình Thạnh</h1>
        </div>
        <div class="row">
            @foreach (XT.Model.Area area in Model.Areas.Take(8))
            {
                <div class="col-xs-6 col-md-3">
                    <a href=' @Url.Action("Index", "Area", new { id = area.Id })'  class="areainfo" style="text-decoration: none">
                        <div class="areaimg">
                            <div class="thumbnail">

                                <img src="@area.Area_Image" data-src="holder.js/100%x180" alt="..." style="height: 120px" />
                            </div>
                            <div class="detailarea">
                                <p>@area.Rooms.Count()</p>
                            </div>
                        </div>
                        <p>@area.Area_Name</p>
                    </a>
                </div>
            }
        </div>
        @Html.ActionLink("Xem tất cả khu vực", "Areas", new { id = @Model.Id })
    </div>
</div>
<div class="utilities" style="background-color: rgb(260, 260, 260); margin-top: 25px">
    <div class="container">
        <div class="districtitle" style="margin: 0 auto; text-align: center; font-family: Helvetica,Arial,sans-serif;">
            <h1>Featured Utilities</h1>
        </div>
        <div class="row">

            <br />
            @foreach (XT.Model.Utility_Place utility in Model.Areas.SelectMany(a => a.Utility_Places))
            {
                <div class="col-sm-6 col-md-4">
                    <div class="thumbnail">
                        <div class="avaimg">
                            <img data-src="holder.Scripts/300x200" alt="..." src="@utility.Utility_Image" />
                            <div class="detail">
                                <p>@utility.Utility_Place_Description</p>
                            </div>
                        </div>
                        <div class="caption1">

                            <h3>@utility.Utility_Place_Name</h3>
                        </div>
                        <div class="utilitiadd">
                            <p>
                                Phan Boi Chau Street, Ben Thanh Ward, District 1, Ho Chi Minh City   
                            </p>

                        </div>

                    </div>

                </div>
            }
        </div>
       @Html.ActionLink("Xem tất cả tiện ích", "Utilities", new { id = @Model.Id })
        <hr />
    </div>
</div>
